package exercise.day04;

public class ForDemo {
    public static void main(String[] args) {
        for (int times = 0; times < 5; times++) {
            System.out.println("行动是成功的阶梯");
        }
        System.out.println("继续执行...");

        for (int num = 1; num <= 9; num++) {
            System.out.println(num + "*9=" + num * 9);
        }
        for (int num = 1; num <= 9; num += 2) {
            System.out.println(num + "*9=" + num * 9);
        }
        for (int num = 9; num >= 1; num--) {
            System.out.println(num + "*9=" + num * 9);
        }

        System.out.println("-----------------");

        for (int a = 1; a <= 8; a++) {
            System.out.println(a + "*8=" + a * 8);
        }
        for (int a = 0; a < 5; a++) {
            System.out.println("我是要成为海贼王的男人");
        }
        for (int num = 9; num >= 1; num--) {
            System.out.println(num + "*9=" + num * 9);
        }
        for (int num = 1; num <= 7; num += 2) {
            System.out.println(num + "*7=" + num * 7);
        }

        for (int a = 9; a >=1 ; a--) {
            System.out.println(" ");
            for (int b = 1; b <= a; b++) {
                if (a + b == b + a) {
                    System.out.print(b + "*" + a + "=" + a * b + " ");
                }
            }

        }
    }
}
